I. Field
The present invention relates generally to the efficient operation of a device, and more particularly, to a system for invoking a privileged function in a device.
II. Description of the Related Art
Advances in technology have resulted in the development of a variety of devices for home, office, and personal use. For example, computer systems, such as desktops, notebooks, and tablet computers have become powerful tools for use at home or in office environments. Personal devices, such as wireless telephones, personal digital assistants (PDAs), and paging devices have also become more powerful and are now widely used.
Many devices now comprise complex hardware and software that run operating systems such as UNIX, LINUX, or similar operating systems. Generally, these operating systems provide for multiple modes of operation. For example, most systems provide privileged and non-privileged modes of operation. Programs executing in the privileged mode of operation are allowed to access memory and system resources without limitation. Programs executing in the non-privileged mode are restricted from accessing certain memory regions and/or device systems. This configuration provides a level of protection to important memory or device functions. For example, by executing third-party applications in the non-privileged mode, important memory regions and device functions can be protected from unauthorized access. Also, such an arrangement allows the system to isolate faults during execution.
However, in some situations, it is desirable to allow privileged mode functions to be invoked from applications executing in either the privileged or non-privileged mode. For example, it is desirable for a privileged mode application to have access to privileged mode functions, but it is also desirable for an application executing in the non-privileged mode to have access to the same privileged functions. For example, it may be desirable to allow an application to have access to a selected system file, or device hardware, such as a device modem.
Unfortunately, conventional systems utilize a trap to suspend execution of the non-privileged application while a separate privileged mode “kernel” task performs the requested operation. As a result, the new privileged mode task results in additional scheduling complexity and overhead. There may also be additional system delays in the form of dispatcher latency. Furthermore, the new task may execute at a different priority than the non-privileged application from which it was invoked, thereby further complicating system scheduling and operation.
Therefore, what is needed is a system that provides a way for an application, executing in either the privileged or non-privileged mode, to invoke a privileged function to execute within the same task as the application, thereby providing access to privileged mode hooks to applications executing under either mode.